import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:"/",
      redirect:"/login"
    },
    {
      path:"/home",
      component:()=>import("../pages/home/index.vue"),
      children:[
        {
          path:"/home",
          redirect:"/home/datacenter"
        },
        {
          path:"/home/datacenter",
          component:()=>import("../pages/home/datacenter/index.vue")
        },
        {
          path:"/home/comment",
          component:()=>import("../pages/home/comment/index.vue"),
        },
        {
          path:"/home/homeclothes",
          component:()=>import("../pages/home/homeclothes/index.vue"),
        },
        {
          path:"/home/houseorder",
          component:()=>import("../pages/home/houseorder/index.vue"),
        },
        {
          path:"/home/notvip",
          component:()=>import("../pages/home/notvip/index.vue"),
        },
        {
          path:"/home/ordertotal",
          component:()=>import("../pages/home/ordertotal/index.vue"),
        },
        {
          path:"/home/serverorder",
          component:()=>import("../pages/home/serverorder/index.vue"),
        },
        {
          path:"/home/share",
          component:()=>import("../pages/home/share/index.vue"),
        },
        {
          path:"/home/vip",
          component:()=>import("../pages/home/vip/index.vue"),
        },
        {
          path:"/home/whole",
          component:()=>import("../pages/home/whole/index.vue"),
        },
        {
          path:"/home/setting",
          component:()=>import("../pages/home/setting/index.vue"),
        },
      ]
    },
    {
      path:"/login",
      component:()=>import("../pages/login/index.vue")
    },
    {
      path:'/:pathMatch(.*)*',
      component:()=>import("../pages/notFound/index.vue")
    },
  ]
})

export default router
